package com.party.core.model.commune;

import com.party.core.model.BaseModel;

import java.util.List;
import java.util.Objects;

/**
 * @program: party
 * @description: 积分类型
 * @author: Hua Qunhao
 * @create: 2019-08-12 14:09
 **/
public class CIntegralType extends BaseModel {

    //'类型名称'
    private String name;
    //'排序'
    private Integer sort;
    //积分项数量
    private Integer itemNum;
    //奖牌
    private List<CIntegralMedal> resources;
    //(0：普通，1：推荐 2:赠送)
    private Integer category;
    //默认奖牌
    private String medalUrl;

    private List<String> orgIds;

    private List<Integer> categorys;


    public CIntegralType() {
    }

    public CIntegralType(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getItemNum() {
        return itemNum;
    }

    public void setItemNum(Integer itemNum) {
        this.itemNum = itemNum;
    }

    public List<CIntegralMedal> getResources() {
        return resources;
    }

    public void setResources(List<CIntegralMedal> resources) {
        this.resources = resources;
    }

    public List<String> getOrgIds() {
        return orgIds;
    }

    public void setOrgIds(List<String> orgIds) {
        this.orgIds = orgIds;
    }

    public Integer getCategory() {
        return category;
    }

    public void setCategory(Integer category) {
        this.category = category;
    }

    public List<Integer> getCategorys() {
        return categorys;
    }

    public void setCategorys(List<Integer> categorys) {
        this.categorys = categorys;
    }

    public String getMedalUrl() {
        return medalUrl;
    }

    public void setMedalUrl(String medalUrl) {
        this.medalUrl = medalUrl;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        CIntegralType that = (CIntegralType) o;
        return Objects.equals(name, that.name) &&
                Objects.equals(sort, that.sort) &&
                Objects.equals(itemNum, that.itemNum) &&
                Objects.equals(resources, that.resources) &&
                Objects.equals(category, that.category) &&
                Objects.equals(orgIds, that.orgIds);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), name, sort, itemNum, resources, category, orgIds);
    }
}
